<%@page import="java.util.Locale"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page contentType="text/html; charset=UTF-8"%>

<html>
<head>
<link href="<s:url value='/css/not-ie.css' />" rel="stylesheet"
	type="text/css">

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script language="javascript">
	function sf(){

		document.getElementsByName("criteria.username")[0].focus();
	}
	function login() {
		var username = document.getElementsByName("criteria.username")[0].value;
		var password = document.getElementsByName("criteria.password")[0].value;
		if (username == "" || password == "") {
			alert("กรุณากรอก ชื่อผู้ใช้ หรือ รหัสผ่าน");
			return false;
		}
		frm = document.loginForm;
		frm.action = "<s:url value='/jsp/loginLogin.action'/>";
		frm.submit();
	}
</script>
<title>เข้าสู่ระบบ</title>
</head>
<body onload="sf();">
	<s:form name="loginForm" method="post" theme="simple" id="loginForm" cssClass="margin-zero" onsubmit="login();">
	<s:submit cssClass="submit" id="submitId"/>
		<center>
			<div class="body">
				<s:include value="/jsp/template/banner.jsp" />
				<table width="100%">
					<tr>
						<td colspan="2"></td>
					</tr>
					<tr>
						<br />
						<br />
						<br />
						<br />
						<td align="right" width="550px"></td>
						<td align="left" valign="middle" height="100%">
							<table cellpadding="0" cellspacing="0" border="0">
								<tr>
									<td align="center" colspan="2">
										<table class="showMessage">
											<tr>
												<td width="50px"></td>
												<td align="left" id="messageTd" class="message"><font
													class="require"> <s:property
															value="#request.message" /></font></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr height="40px">
									<td align="right" class="loginLabel"><s:text
											name="username" /> <font class="require">&nbsp;*&nbsp;</font>
									</td>
									<td width="200px"><s:textfield name="criteria.username" value="admin"
											style="vertical-align:middle;font-size:15px;width:200px;height:25px;"
											autocomplete="off" maxlength="20" cssClass="loginTextField" />
									</td>
								</tr>
								<tr height="10px">
									<td colspan="2"></td>
								</tr>
								<tr height="40px">
									<td align="right" class="loginLabel"><s:text
											name="password" /> <font class="require">&nbsp;*&nbsp;</font>
									</td>
									<td><s:textfield name="criteria.password" value="admin"
											style="vertical-align:middle;font-size:15px;width:200px;height:25px;"
											autocomplete="off" maxlength="20" cssClass="loginTextField" />
									</td>
								</tr>
								<tr>
									<td></td>
									<td align="right"><a href="#"
										onclick="javascript: return login();"> <img
											src="<s:url value='/images/button/th_login.gif' />"
											border="0">
									</a></td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td colspan="2" height="80px;">&nbsp;</td>
					</tr>
					<tr>
						<td colspan="2" height="150px">&nbsp;</td>
					</tr>
				</table>

				<table class="template_footer" align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
			
					<tr>
						<td align="center"><font size="2"> Copyright 2013</font></td>
					</tr>
					<tr>
						<td align="center"></td>
					</tr>
				</table>
			</div>
		</center>
		<s:token />
	</s:form>
</body>
</html>